
package com.jf.cloud.auth.dto;

import com.jf.cloud.common.util.PrincipalUtil;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 忘记密码
 *
 * @author zz
 * @date 2021/01/29
 */
public class ForgetPasswordDTO {

    @NotNull(message = "newPassword NotNull")
    @Schema(description = "新密码" , required = true)
    private String newPassword;

    @NotNull
    @Schema(description = "系统类型 0普通用户 1商家端 2平台端" , required = true)
    private Integer sysType;

    @Schema(description = "校验登陆注册验证码成功的标识" )
    private String checkUpdatePwdSmsFlag;

    @Schema(description = "手机号" , required = true)
    @Pattern(regexp= PrincipalUtil.MOBILE_REGEXP,message = "请输入正确的手机号")
    @NotBlank(message = "手机号不能为空")
    private String mobile;


    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public Integer getSysType() {
        return sysType;
    }

    public void setSysType(Integer sysType) {
        this.sysType = sysType;
    }

    public String getCheckUpdatePwdSmsFlag() {
        return checkUpdatePwdSmsFlag;
    }

    public void setCheckUpdatePwdSmsFlag(String checkUpdatePwdSmsFlag) {
        this.checkUpdatePwdSmsFlag = checkUpdatePwdSmsFlag;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Override
    public String toString() {
        return "ForgetPasswordDTO{" +
                ", newPassword='" + newPassword + '\'' +
                ", sysType=" + sysType +
                ", checkUpdatePwdSmsFlag='" + checkUpdatePwdSmsFlag + '\'' +
                ", mobile='" + mobile + '\'' +
                '}';
    }
}
